<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class Bundler::CLI::Install - bundler: Ruby Standard Library Documentation</title>


<script src="../../js/navigation.js" defer></script>
<script src="../../js/search.js" defer></script>
<script src="../../js/search_index.js" defer></script>
<script src="../../js/searcher.js" defer></script>
<script src="../../js/darkfish.js" defer></script>

<script src="../../js/jquery-3.2.0.min.js"></script>

<script src="../../js/vue.min.js"></script>
<script src="../../js/js.cookie.min.js"></script>

<link href="../../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../../css/rdoc.css" rel="stylesheet">
<link href="../../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../";
  var index_rel_prefix = "../../";
  var darkModeCsseHref = "../../css/rdoc-dm.css"
  var defaultModeCssHref = "../../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../../table_of_contents.html#pages">Pages</a>
    <a href="../../table_of_contents.html#classes">Classes</a>
    <a href="../../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../../Object.html">Object</a>
</div>

        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-check_for_group_conflicts_in_cli_options">#check_for_group_conflicts_in_cli_options</a>
    <li ><a href="#method-i-check_for_options_conflicts">#check_for_options_conflicts</a>
    <li ><a href="#method-i-check_trust_policy">#check_trust_policy</a>
    <li ><a href="#method-i-dependencies_count_for">#dependencies_count_for</a>
    <li ><a href="#method-i-gems_installed_for">#gems_installed_for</a>
    <li ><a href="#method-i-normalize_groups">#normalize_groups</a>
    <li ><a href="#method-i-normalize_settings">#normalize_settings</a>
    <li ><a href="#method-i-run">#run</a>
    <li ><a href="#method-i-warn_ambiguous_gems">#warn_ambiguous_gems</a>
    <li ><a href="#method-i-warn_if_root">#warn_if_root</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-Bundler::CLI::Install">
    <h1 id="class-Bundler::CLI::Install" class="class">
      class Bundler::CLI::Install
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">



        <section class="attribute-method-details" class="method-section">
        <header>
        <h3>Attributes</h3>
        </header>

          <div id="attribute-i-options" class="method-detail">
            <div class="method-heading attribute-method-heading">
              <span class="method-name">options</span><span
                class="attribute-access-type">[R]</span>
            </div>

            <div class="method-description">
              
              </div>
            </div>
            </section>


                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(options)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File bundler/cli/install.rb, line 6</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">options</span>)
  <span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-run" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">run</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="run-source">
            <pre><span class="ruby-comment"># File bundler/cli/install.rb, line 10</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">run</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">level</span> = <span class="ruby-string">&quot;warn&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:quiet</span>]

  <span class="ruby-identifier">warn_if_root</span>

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">self_manager</span>.<span class="ruby-identifier">install_locked_bundler_and_restart_with_it_if_needed</span>

  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">set_env</span> <span class="ruby-string">&quot;RB_USER_INSTALL&quot;</span>, <span class="ruby-string">&quot;1&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">FREEBSD</span>

  <span class="ruby-comment"># Disable color in deployment mode</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">shell</span> = <span class="ruby-constant">Thor</span><span class="ruby-operator">::</span><span class="ruby-constant">Shell</span><span class="ruby-operator">::</span><span class="ruby-constant">Basic</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:deployment</span>]

  <span class="ruby-identifier">check_for_options_conflicts</span>

  <span class="ruby-identifier">check_trust_policy</span>

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:deployment</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:frozen</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">frozen_bundle?</span>
    <span class="ruby-keyword">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_lockfile</span>.<span class="ruby-identifier">exist?</span>
      <span class="ruby-identifier">flag</span>   = <span class="ruby-string">&quot;--deployment flag&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:deployment</span>]
      <span class="ruby-identifier">flag</span> <span class="ruby-operator">||=</span> <span class="ruby-string">&quot;--frozen flag&quot;</span>     <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:frozen</span>]
      <span class="ruby-identifier">flag</span> <span class="ruby-operator">||=</span> <span class="ruby-string">&quot;deployment setting&quot;</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">ProductionError</span>, <span class="ruby-node">&quot;The #{flag} requires a #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}. Please make &quot;</span> \
                             <span class="ruby-node">&quot;sure you have checked your #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} into version control &quot;</span> \
                             <span class="ruby-string">&quot;before deploying.&quot;</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">options</span>[<span class="ruby-value">:local</span>] = <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">app_cache</span>.<span class="ruby-identifier">exist?</span>

    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option</span> <span class="ruby-value">:deployment</span>, <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:deployment</span>]
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option</span> <span class="ruby-value">:frozen</span>, <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:frozen</span>]
  <span class="ruby-keyword">end</span>

  <span class="ruby-comment"># When install is called with --no-deployment, disable deployment mode</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:deployment</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword">false</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option</span> <span class="ruby-value">:frozen</span>, <span class="ruby-keyword">nil</span>
    <span class="ruby-identifier">options</span>[<span class="ruby-value">:system</span>] = <span class="ruby-keyword">true</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">normalize_settings</span>

  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">Fetcher</span>.<span class="ruby-identifier">disable_endpoint</span> = <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;full-index&quot;</span>]

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;binstubs&quot;</span>]
    <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">SharedHelpers</span>.<span class="ruby-identifier">major_deprecation</span> <span class="ruby-value">2</span>,
      <span class="ruby-string">&quot;The --binstubs option will be removed in favor of `bundle binstubs --all`&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-constant">Plugin</span>.<span class="ruby-identifier">gemfile_install</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">default_gemfile</span>) <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">feature_flag</span>.<span class="ruby-identifier">plugins?</span>

  <span class="ruby-identifier">definition</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">definition</span>
  <span class="ruby-identifier">definition</span>.<span class="ruby-identifier">validate_runtime!</span>

  <span class="ruby-identifier">installer</span> = <span class="ruby-constant">Installer</span>.<span class="ruby-identifier">install</span>(<span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">root</span>, <span class="ruby-identifier">definition</span>, <span class="ruby-identifier">options</span>)

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">temporary</span>(<span class="ruby-value">:cache_all_platforms</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:local</span>] <span class="ruby-operator">?</span> <span class="ruby-keyword">false</span> <span class="ruby-operator">:</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:cache_all_platforms</span>]) <span class="ruby-keyword">do</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">load</span>.<span class="ruby-identifier">cache</span>(<span class="ruby-keyword">nil</span>, <span class="ruby-identifier">options</span>[<span class="ruby-value">:local</span>]) <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">app_cache</span>.<span class="ruby-identifier">exist?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;no-cache&quot;</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">frozen_bundle?</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">&quot;Bundle complete! #{dependencies_count_for(definition)}, #{gems_installed_for(definition)}.&quot;</span>
  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">CLI</span><span class="ruby-operator">::</span><span class="ruby-constant">Common</span>.<span class="ruby-identifier">output_without_groups_message</span>(<span class="ruby-value">:install</span>)

  <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">use_system_gems?</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-string">&quot;Use `bundle info [gemname]` to see where a bundled gem is installed.&quot;</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">relative_path</span> = <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">configured_bundle_path</span>.<span class="ruby-identifier">base_path_relative_to_pwd</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">confirm</span> <span class="ruby-node">&quot;Bundled gems are installed into `#{relative_path}`&quot;</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">CLI</span><span class="ruby-operator">::</span><span class="ruby-constant">Common</span>.<span class="ruby-identifier">output_post_install_messages</span> <span class="ruby-identifier">installer</span>.<span class="ruby-identifier">post_install_messages</span>

  <span class="ruby-identifier">warn_ambiguous_gems</span>

  <span class="ruby-keyword">if</span> <span class="ruby-constant">CLI</span><span class="ruby-operator">::</span><span class="ruby-constant">Common</span>.<span class="ruby-identifier">clean_after_install?</span>
    <span class="ruby-identifier">require_relative</span> <span class="ruby-string">&quot;clean&quot;</span>
    <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">CLI</span><span class="ruby-operator">::</span><span class="ruby-constant">Clean</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">run</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-constant">Bundler</span><span class="ruby-operator">::</span><span class="ruby-constant">CLI</span><span class="ruby-operator">::</span><span class="ruby-constant">Common</span>.<span class="ruby-identifier">output_fund_metadata_summary</span>
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">InvalidSpecificationException</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-string">&quot;You have one or more invalid gemspecs that need to be fixed.&quot;</span>
  <span class="ruby-identifier">raise</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-check_for_group_conflicts_in_cli_options" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">check_for_group_conflicts_in_cli_options</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="check_for_group_conflicts_in_cli_options-source">
            <pre><span class="ruby-comment"># File bundler/cli/install.rb, line 111</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">check_for_group_conflicts_in_cli_options</span>
  <span class="ruby-identifier">conflicting_groups</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:without</span>]) <span class="ruby-operator">&amp;</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">options</span>[<span class="ruby-value">:with</span>])
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">conflicting_groups</span>.<span class="ruby-identifier">empty?</span>
  <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidOption</span>, <span class="ruby-string">&quot;You can&#39;t list a group in both with and without.&quot;</span> \
    <span class="ruby-node">&quot; The offending groups are: #{conflicting_groups.join(&quot;, &quot;)}.&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-check_for_options_conflicts" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">check_for_options_conflicts</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="check_for_options_conflicts-source">
            <pre><span class="ruby-comment"># File bundler/cli/install.rb, line 118</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">check_for_options_conflicts</span>
  <span class="ruby-keyword">if</span> (<span class="ruby-identifier">options</span>[<span class="ruby-value">:path</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:deployment</span>]) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:system</span>]
    <span class="ruby-identifier">error_message</span> = <span class="ruby-constant">String</span>.<span class="ruby-identifier">new</span>
    <span class="ruby-identifier">error_message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;You have specified both --path as well as --system. Please choose only one option.\n&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:path</span>]
    <span class="ruby-identifier">error_message</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-string">&quot;You have specified both --deployment as well as --system. Please choose only one option.\n&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:deployment</span>]
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidOption</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">error_message</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-check_trust_policy" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">check_trust_policy</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="check_trust_policy-source">
            <pre><span class="ruby-comment"># File bundler/cli/install.rb, line 127</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">check_trust_policy</span>
  <span class="ruby-identifier">trust_policy</span> = <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;trust-policy&quot;</span>]
  <span class="ruby-keyword">unless</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">rubygems</span>.<span class="ruby-identifier">security_policies</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">unshift</span>(<span class="ruby-keyword">nil</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">trust_policy</span>)
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidOption</span>, <span class="ruby-node">&quot;RubyGems doesn&#39;t know about trust policy &#39;#{trust_policy}&#39;. &quot;</span> \
      <span class="ruby-node">&quot;The known policies are: #{Bundler.rubygems.security_policies.keys.join(&quot;, &quot;)}.&quot;</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option_if_given</span> <span class="ruby-value">:&quot;trust-policy&quot;</span>, <span class="ruby-identifier">trust_policy</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-dependencies_count_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">dependencies_count_for</span><span
                                class="method-args">(definition)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="dependencies_count_for-source">
            <pre><span class="ruby-comment"># File bundler/cli/install.rb, line 101</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">dependencies_count_for</span>(<span class="ruby-identifier">definition</span>)
  <span class="ruby-identifier">count</span> = <span class="ruby-identifier">definition</span>.<span class="ruby-identifier">dependencies</span>.<span class="ruby-identifier">count</span>
  <span class="ruby-node">&quot;#{count} Gemfile #{count == 1 ? &quot;dependency&quot; : &quot;dependencies&quot;}&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-gems_installed_for" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">gems_installed_for</span><span
                                class="method-args">(definition)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="gems_installed_for-source">
            <pre><span class="ruby-comment"># File bundler/cli/install.rb, line 106</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">gems_installed_for</span>(<span class="ruby-identifier">definition</span>)
  <span class="ruby-identifier">count</span> = <span class="ruby-identifier">definition</span>.<span class="ruby-identifier">specs</span>.<span class="ruby-identifier">count</span>
  <span class="ruby-node">&quot;#{count} #{count == 1 ? &quot;gem&quot; : &quot;gems&quot;} now installed&quot;</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-normalize_groups" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">normalize_groups</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="normalize_groups-source">
            <pre><span class="ruby-comment"># File bundler/cli/install.rb, line 136</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">normalize_groups</span>
  <span class="ruby-identifier">check_for_group_conflicts_in_cli_options</span>

  <span class="ruby-comment"># need to nil them out first to get around validation for backwards compatibility</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option</span> <span class="ruby-value">:without</span>, <span class="ruby-keyword">nil</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option</span> <span class="ruby-value">:with</span>,    <span class="ruby-keyword">nil</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option</span> <span class="ruby-value">:without</span>, <span class="ruby-identifier">options</span>[<span class="ruby-value">:without</span>]
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option</span> <span class="ruby-value">:with</span>,    <span class="ruby-identifier">options</span>[<span class="ruby-value">:with</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-normalize_settings" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">normalize_settings</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="normalize_settings-source">
            <pre><span class="ruby-comment"># File bundler/cli/install.rb, line 146</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">normalize_settings</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option</span> <span class="ruby-value">:path</span>, <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:system</span>]
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option_if_given</span> <span class="ruby-value">:path</span>, <span class="ruby-identifier">options</span>[<span class="ruby-value">:path</span>]

  <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;standalone&quot;</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:path</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;local&quot;</span>]
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">temporary</span>(<span class="ruby-value">:path_relative_to_cwd</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">false</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option</span> <span class="ruby-value">:path</span>, <span class="ruby-string">&quot;bundle&quot;</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">bin_option</span> = <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;binstubs&quot;</span>]
  <span class="ruby-identifier">bin_option</span> = <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">bin_option</span>&amp;.<span class="ruby-identifier">empty?</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option</span> <span class="ruby-value">:bin</span>, <span class="ruby-identifier">bin_option</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;binstubs&quot;</span>]

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option_if_given</span> <span class="ruby-value">:shebang</span>, <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;shebang&quot;</span>]

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option_if_given</span> <span class="ruby-value">:jobs</span>, <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;jobs&quot;</span>]

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option_if_given</span> <span class="ruby-value">:no_prune</span>, <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;no-prune&quot;</span>]

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option_if_given</span> <span class="ruby-value">:no_install</span>, <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;no-install&quot;</span>]

  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>.<span class="ruby-identifier">set_command_option_if_given</span> <span class="ruby-value">:clean</span>, <span class="ruby-identifier">options</span>[<span class="ruby-string">&quot;clean&quot;</span>]

  <span class="ruby-identifier">normalize_groups</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:without</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:with</span>]

  <span class="ruby-identifier">options</span>[<span class="ruby-value">:force</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value">:redownload</span>]
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-warn_ambiguous_gems" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">warn_ambiguous_gems</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="warn_ambiguous_gems-source">
            <pre><span class="ruby-comment"># File bundler/cli/install.rb, line 175</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">warn_ambiguous_gems</span>
  <span class="ruby-comment"># TODO: remove this when we drop Bundler 1.x support</span>
  <span class="ruby-constant">Installer</span>.<span class="ruby-identifier">ambiguous_gems</span>.<span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">installed_from_uri</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">also_found_in_uris</span><span class="ruby-operator">|</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-node">&quot;Warning: the gem &#39;#{name}&#39; was found in multiple sources.&quot;</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-node">&quot;Installed from: #{installed_from_uri}&quot;</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-string">&quot;Also found in:&quot;</span>
    <span class="ruby-identifier">also_found_in_uris</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">uri</span><span class="ruby-operator">|</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-node">&quot;  * #{uri}&quot;</span> }
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-string">&quot;You should add a source requirement to restrict this gem to your preferred source.&quot;</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-string">&quot;For example:&quot;</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-node">&quot;    gem &#39;#{name}&#39;, :source =&gt; &#39;#{installed_from_uri}&#39;&quot;</span>
    <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-node">&quot;Then uninstall the gem &#39;#{name}&#39; (or delete all bundled gems) and then install again.&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-warn_if_root" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">warn_if_root</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="warn_if_root-source">
            <pre><span class="ruby-comment"># File bundler/cli/install.rb, line 95</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">warn_if_root</span>
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">settings</span>[<span class="ruby-value">:silence_root_warning</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">win_platform?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-constant">Process</span>.<span class="ruby-identifier">uid</span>.<span class="ruby-identifier">zero?</span>
  <span class="ruby-constant">Bundler</span>.<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span> <span class="ruby-string">&quot;Don&#39;t run Bundler as root. Installing your bundle as root &quot;</span> \
                  <span class="ruby-string">&quot;will break this application for all non-root users on this machine.&quot;</span>, <span class="ruby-value">:wrap</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is a service of <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>, purveyors of fine <a href='https://jamesbritt.bandcamp.com/'>dance noise</a></p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

